package com.kun.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.kun.dao.UserRepository;
import com.kun.entity.UserTest;

@RestController
public class UserController {
	@Autowired
	private UserRepository userRepository;

	@RequestMapping("user/{id}")
	public UserTest home(@PathVariable Integer id) {
		return userRepository.findOne(id);
	}
}
